repo.or.cz
/
andmenj-acm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Namespacing everything to /UVa.
[andmenj-acm.git]
/
UVa
/
11462 - Age sort
/
11462.cpp
blob
dc73186f8408c53f6af664174b8c6b493706c01d
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <iostream>
4
5
using namespace
std
;
6
7
8
const int
SIZE
=
100
;
9
10
int
v
[
SIZE
+
1
];
11
12
int
main
(){
13
int
n
,
i
,
j
;
14
while
(
scanf
(
"%d"
, &
n
) ==
1
&&
n
){
15
memset
(
v
,
0
,
sizeof
v
);
16
for
(
int
i
=
0
;
i
<
n
; ++
i
){
17
scanf
(
"%d"
, &
j
);
18
++
v
[
j
];
19
}
20
bool
first
=
true
;
21
for
(
int
i
=
1
;
i
<=
SIZE
; ++
i
){
22
while
(
v
[
i
]--){
23
if
(!
first
)
printf
(
" "
);
24
first
=
false
;
25
printf
(
"%d"
,
i
);
26
}
27
}
28
puts
(
""
);
29
}
30
return
0
;
31
}